import com.example.order.IGoodsService;
import com.example.order.IUserService;
import com.example.order.UserServiceApplication;
import com.example.order.entity.TradeGoods;
import com.example.order.entity.TradeUser;
import com.example.order.utils.IDWorker;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author: robert.song
 * @Date: Created in 2021/12/18
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = {UserServiceApplication.class})
public class Initial {
    @Autowired
    private IUserService userService;

    @Resource
    private IDWorker idWorker;

    @Test
    public void test(){
        TradeUser tradeUser = new TradeUser(idWorker.nextId(), "宋亚辉", "zs199610.","15225723153", 100, new Date(), 1000l);
        userService.insert(tradeUser);
    }
}
